<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			/* 选择拥有size属性的input标签*/
			input[size] {
				background-color: red;
			}
			/* 选择type属性是email的input标签*/
			input[type=email] {
				background-color: yellow;
			}
			/* 选择type属性以nick开头的input标签*/
			input[name^=nick] {
				background-color: blue;
			}
			
			/* 选择type属性以pwd结尾的input标签*/
			input[name$=pwd] {
				background-color: green;
			}
			
			/* 选择type属性包含user的input标签*/
			input[name*=user] {
				height: 50px;
			}
		</style>
	</head>
	<body>
		<p>姓名:<input type="text" name="username" size="20"/></p>
		<p>密码:<input type="password" name="userpwd" /></p>
		<p>昵称:<input type="text" name="nickname" /></p>
		<p>邮箱:<input type="email" name="useremail" /></p>
		<p>手机:<input type="tel" name="userphone" /></p>
	</body>
</html>
